﻿@model IceTea.Domain.Models.User
@using IceTea.Infrastructure;

@{    
    ViewBag.Title = "Register";
    Layout = "~/Views/Shared/_Layout.cshtml";
    string labelcol = "col-md-2";
    string inputcol = "col-md-6";
}

<h2>Register</h2>
@using (Html.BeginForm("Register", "Account", FormMethod.Post, new{@class="form-horizontal", @role="form"}))
    {
        <div class="form-group">@Html.ValidationSummary()</div>
        <div class="form-group">
            @Html.LabelFor(u => u.UserName, new { @class="control-label " + labelcol})
        <div class="@inputcol">
            @Html.TextBoxFor(u=>u.UserName, new{@class="form-control", @autofocus="autofocus"})
        </div>
            <div class="col-md-1"><span class="glyphicon glyphicon-asterisk"></span></div>
        </div>

        <div class="form-group">
            @Html.LabelFor(u=>u.Email, new{@class="control-label " + labelcol})
        <div class="@inputcol">
            @Html.TextBoxFor(u=>u.Email, new{@class="form-control"})
        </div>
            <div class="col-md-1"><span class="glyphicon glyphicon-asterisk"></span></div>
        </div>

        <div class="form-group">
        @Html.LabelFor(u=>u.FullName, new{@class="control-label " + labelcol})
        <div class="@inputcol">
            @Html.TextBoxFor(u=>u.FullName, new{@class="form-control"})
        </div>
            <div class="col-md-1"><span class="glyphicon glyphicon-asterisk"></span></div>
        </div>

        <div class="form-group">
        @Html.LabelFor(u=>u.Title, new{@class="control-label " + labelcol})
        <div class="@inputcol">
            @Html.TextBoxFor(u=>u.Title, new{@class="form-control"})
        </div></div>

        <div class="form-group">
        @Html.LabelFor(u=>u.Password1, new{@class="control-label " + labelcol})
        <div class="@inputcol">
            @Html.PasswordFor(u=>u.Password1, new{@class="form-control"})
        </div>
            <div class="col-md-1"><span class="glyphicon glyphicon-asterisk"></span></div>
        </div>

        <div class="form-group">
        @Html.LabelFor(u=>u.Password2, new{@class="control-label " + labelcol})
        <div class="@inputcol">
            @Html.PasswordFor(u=>u.Password2, new{@class="form-control"})
        </div>
            <div class="col-md-1"><span class="glyphicon glyphicon-asterisk"></span></div>
        </div>

        <div class="form-group">
        @Html.LabelFor(u=>u.PasswordQuestion, new{@class="control-label " + labelcol})
        <div class="@inputcol">
            @Html.TextBoxFor(u=>u.PasswordQuestion, new{@class="form-control"})
        </div></div>    
    
        <div class="form-group">
        @Html.LabelFor(u=>u.PasswordAnswer, new{@class="control-label " + labelcol})
        <div class="@inputcol">
            @Html.TextBoxFor(u=>u.PasswordAnswer, new{@class="form-control"})
        </div></div>
    
        <div class="form-group">
        <div class="col-md-8 col-md-offset-2">
            <button type="submit" class="btn btn-success">Register</button>
            
            @Html.ActionLink("Cancel", "Index", "Home", null, new { @class = "btn btn-default" })
            </div>
        </div>
    }

@Scripts.Render("~/bundles/validate")
